import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;

/**
 * Copyright (C), 2019, Sensetime Tech. Co., Ltd.
 *
 * @Name: dssdfsdf
 * @Since: 4.0
 * @Version: v1.0
 * @Date: 2020/7/30 17:30
 * @Author: zhouguanbao@sensetime.com
 * @Description: TODO
 **/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class LabelFilter implements Printable {
    //@ApiModelProperty(value = "标签分类id，跟标签id两个必须至少传一个")
    @ApiModelProperty(value = "标签分类id", required = true)
    @NotBlank
    private String categoryId;

    //@ApiModelProperty(value = "标签id，跟标签分类id两个必须至少传一个")
    @ApiModelProperty(value = "标签id", required = true)
    @NotBlank
    private String labelId;

    public void print(){
        if(null != categoryId && categoryId.length() > 0){
            System.out.print(categoryId);
        }
        if(null != categoryId && categoryId.length() > 0 && null != labelId && labelId.length() > 0){
            System.out.print(":");
        }
        if(null != labelId && labelId.length() > 0){
            System.out.print(labelId);
        }
    }
}
